In [1]:
using PyPlot
import DSP
In [2]:
include("../juwvid.jl")
Out[2]:
In [3]:
# multi component data
nsample=512
t,x=sampledata.genmultifm623x(nsample);
PyPlot.plot(t,x)
Out[3]:
In [4]:
# the resolution is poor
trfpo=polywv.tfrpowv(x,NaN,NaN,NaN,2,2);
a=juwplot.wtfrshow(abs.(trfpo),t[2]-t[1],t[1],t[end],NaN,NaN,0.7*3)
PyPlot.ylim(0,40)
Out[4]:
In [5]:
nnufft=1024
nsample=length(t)
js,je=juwutils.frequency_to_index([5.0,30.0], t[2]-t[1], nsample,nnufft)
Out[5]:
In [6]:
# now, the resolution is fine
fin=collect(linspace(js,je,nnufft));
trfpo=polywv.tfrpowv(x,NaN,NaN,fin,2,2);
a=juwplot.wtfrshow(abs.(trfpo),t[2]-t[1],t[1],t[end],NaN,NaN,0.7)
Out[6]: